#!/bin/bash

hosts=$( echo $1 | tr ',' ' ' )
exe=$2
path=$3
class=$4
func=$5
env=$6


k=0;
for host in $hosts;
do
    ssh $host "export SEISFLOWS_TASK_ID=$k; $exe $path $class $func $env" &
    k=$((k+1));
    sleep 0.5
done
wait

